iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 15
0
自我挑戰組

Women in IT field系列 第 15

Simple codes where in different library

  • 分享至 

  • xImage
  •  

Comment math sign in programming languages:

Character Meaning Arguments Return Type
+ Plus Sign int,int int
- Minus Sign int,int int
* Multiplication int,int int*
/ Division int,int int
% Percent Sign or modulus operator int,int int
() Parentheses array,int type of lhs
{} Curly braces array,int type of lhs
[] Square brackets array,int type of lhs
= Equal Sign equal types + arrays type of lhs
? Question mark any array type of array
! Exclamation mark bool bool
& ampersand bool,bool bool
l pipe character bool,bool bool

“\n” means newline and “\b” means backspace.
‘ single quote as a character
“ double quote as a string

Data types

Storage Size Min to Max char
1 –127 to 127 int
2 –32,767 to 32,767 float
4 1E–37 to 1E+37 with six digits of precision double
8 1E–37 to 1E+37 with ten digits of precision long double
10 1E–37 to 1E+37 with ten digits of precision long int
4 –2,147,483,647 to 2,147,483,647 short int
2 –32,767 to 32,767 unsigned short int
2 0 to 65,535 signed short int
2 –32,767 to 32,767 long long int
8 –(2power(63) –1) to 2(power)63 –1 signed long int
4 –2,147,483,647 to 2,147,483,647 unsigned long int
4 0 to 4,294,967,295 unsigned long long int
8 2(power)64 –1

Those are the comment size and math signal.

Decimal: 0, 1, 22 etc
Increase by 10
Octal: 021, 076, 033 etc
Increase by 8
Hexadecimal: 0x7f, 0x2b, 0x521 etc
Increase by 16

Example code as:
#include <stdio.h>

int main(void)
{
printf("Hello, World!\n");
return 0;
}

Which should save as XXX.c
After compilation, the program will have XXX.h which is been created.


上一篇
Career paths
下一篇
Why it is bad to work as an Engineer
系列文
Women in IT field30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言